home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / dev / misc / TCS.lha / TCS / demos / cod / HalfRes.s < prev    next >
Encoding:
Text File  |  2000-09-26  |  2.3 KB  |  86 lines

  1. *******************************************************************************
  2. * simple HalfRes example
  3. *******************************************************************************
  4. * INFO    shows how to open a HalfRes display
  5. * NOTE    - experiment with the display definition parameters
  6. *    - LMB to quit
  7. *******************************************************************************
  8.  
  9.     machine    68020
  10.  
  11.     include    INCLUDES:libraries/tcs.i
  12.     include    INCLUDES:libraries/tcs_lib.i
  13.     include    /inc/macros.i
  14.  
  15.  
  16.  
  17. *******************************************************************************
  18. * custom display definitions
  19. *******************************************************************************
  20.  
  21. DSPLWD    =    320    ;our TCS display width and
  22. DSPLHT    =    256    ;height (LORES pixels)
  23. SCRWD    =    160    ;TCS screen width and
  24. SCRHT    =    256    ;height (HalfRes pixels)
  25. DSPLX0    =    $81*4    ;display start
  26. DSPLY0    =    $2c    ;position (SHRES pixels)
  27. DSPLX1    =    DSPLX0+DSPLWD*4    ;display end
  28. DSPLY1    =    DSPLY0+DSPLHT    ;position (SHRES pixels)
  29. DSPLBRTNS    =    256    ;max brightness
  30. GFXCTXT    =    0    ;graphic context
  31. CWBTM    =    0    ;clipping
  32. CWTOP    =    0    ;window
  33. CWRT    =    0    ;borders
  34. CWLF    =    0    ;coordinates
  35. VDOMODE    =    TCS_VM_RGBW | TCS_VMf_chqr | TCS_VMf_MskPln ;display video mode
  36.  
  37.  
  38.  
  39. *******************************************************************************
  40. * code start
  41. *******************************************************************************
  42.  
  43.     include    /inc/shl_strtup.i
  44.  
  45.  
  46.  
  47. *******************************************************************************
  48. * init
  49. *******************************************************************************
  50.  
  51. _PrgInit    move.w    #0,ccr    ;OK!
  52.     rts
  53.  
  54.  
  55.  
  56. *******************************************************************************
  57. * main
  58. *******************************************************************************
  59.  
  60. _PrgMain    movea.l    DIAdr,a0    ;our display
  61.     moveq.l    #0,d0    ;x0
  62.     moveq.l    #0,d1    ;y0
  63.     move.w    #SCRWD-1,d2    ;x1
  64.     move.w    #SCRHT-1,d3    ;y1
  65.     move.b    #255,d4    ;color
  66.     CALLTCS    DrwFrm0    ;mark screen with a rectangle
  67.  
  68.     WTLMB
  69.     rts
  70.  
  71.  
  72.  
  73. *******************************************************************************
  74. * cleanup
  75. *******************************************************************************
  76.  
  77. _PrgClnUp    rts
  78.  
  79.  
  80.  
  81. *******************************************************************************
  82. * data
  83. *******************************************************************************
  84.  
  85.     include    /inc/dat.i
  86.